<?php 
namespace app\supermanager\model;

use app\common\traits\model\TraitModel;
/**
 * 文章
 */
class News extends \think\Model
{
	use TraitModel;
	protected $table = 'news';
	
	public function getNewsInfoLists()
    {
        return $this->paginate();
    }

    public function createNewsInfo($post_news_info = [])
	{
		return self::create($post_news_info, true);
	}

	public function getNewsInfo($id)
	{
		return $this->where('id',$id)->find();
	}

	public function updateNewsInfo($id, $post_news_info)
	{
		return $this->where('id',$id)->update($post_news_info);
	}
	
	public function delInfo($id)
    {
        $result = $this->destroy($id);
        if ($result) {
            return true;
        }
        return false;
    }
	
	
	
}

 ?>